package main

import (
	"fmt"
	"github.com/spf13/viper"
	"shop/global"
	"shop/router"
)

func init() {

	global.InitViper()
	global.InitMysql()
	fmt.Println("初始化")
}

func main() {

	routes := router.RegisterRoutes()
	routes.Run(viper.GetString("http.port"))
	fmt.Println("启动项目")
}
